from analyze import WeChatData
from qq import QQData
from wordCloud import MyWordCloud

def main():
    chat_file = r"data\xxx\xxx.txt"
    name = 'xxx'

    # Data = WeChatData(chat_file, name, refresh=False) # 微信聊天内容统计
    Data = QQData(chat_file, name, refresh=True) # QQ聊天内容统计

    Data.saveChat()
    Data.draw()
    Data.timeSta()
    Data.countPeoNum()
    Data.countChar()


    # 生成词云
    if False:
        txt_path = Data.getChatPath()
        mask_path = r"mask\flower.png"
        save_path = r"outputs\{}\wordcloud.png".format(name)
        MyWordCloud(txt_path, mask_path, save_path)()



if __name__ == '__main__':
    main()